package com.soulgame.sms.pay.vo;

import org.json.JSONObject;

import com.soul.sdk.utils.json.KJSONObject;

/**
 * @author lch
 * @version Create time：2017-4-5
 * @类说明：
 */
public class VoMMPayParams extends VoPayParams {

	private JSONObject mmDataJsonObject;

	public VoMMPayParams(KJSONObject pSdkParamsJSON) {
		super(pSdkParamsJSON);
		if (pSdkParamsJSON != null) {
			this.mmDataJsonObject = pSdkParamsJSON.optJSONObject("mm");
		}
	}

	public String getPayCode(String pProductId) {
		return super.getPayCode(pProductId, "mm");
	}

	public String getAppId() {

		if (mmDataJsonObject != null) {
			return mmDataJsonObject.optString("appid");
		}

		return "";
	}

	public String getAppKey() {

		if (mmDataJsonObject != null) {
			return mmDataJsonObject.optString("appkey");
		}

		return "";
	}

	public int getSkin() {

		if (mmDataJsonObject != null) {
			return mmDataJsonObject.optInt("skin", 1);
		}

		return 1;
	}

}
